﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using Model;

/// <summary>
/// Summary description for Company
/// </summary>
public class Company
{
    

    public Company()
    {

    }

    //public static void CreateCompany(string companyName, int companyCode, string companyLogo, string phone, string mobile, string email, string webPage, string street, int zipCode)
    //{
    //    Company c = new Company();
    //    var db = new DataClassesDataContext();
    //    c. = companyName;
    //    c.CompanyCode = companyCode;
    //    c.CompanyLogo = companyLogo;
    //    c.Address = street;
    //    c.Phone = phone;
    //    c.Mobile = mobile;
    //    c.Email = email;
    //    c. = DateTime.Now;
    //    c.WebPage = webPage;
    //    c.ZipCode = zipCode;

    //    db.Companies.InsertOnSubmit(c);
    //    db.SubmitChanges();
    //}

    public static string FindCompanyByCompanyCode(string regNr)
    {
        var db = new DataClassesDataContext();

      return (from x in db.Companies
                   where x.CompanyName == (regNr)
                   select x).ToString();
    }


}